package com.bookbuf.biz;


import android.content.Context;
import android.content.Intent;

import com.bookbuf.biz.app.ExamDetailActivity;
import com.bookbuf.module.Proxy;
import com.bookbuf.module.stub.impl.BizProxyStub;

/**
 * author: robert.
 * date :  2016/12/26.
 */
public class BizProxy extends Proxy<BizProxyStub.BizUiInterface, BizProxyStub.BizServiceInterface, BizProxyStub.BizDependence> {

    public BizProxy() {
    }

    @Override
    public BizProxyStub.BizUiInterface uiInterface() {
        return new BizProxyStub.BizUiInterface() {
            @Override
            public void callExamDetailActivity(Context context) {
                if (context != null) {
                    Intent intent = new Intent(context, ExamDetailActivity.class);
                    context.startActivity(intent);
                }
            }
        };
    }

    @Override
    public BizProxyStub.BizServiceInterface serviceInterface() {
        return new BizProxyStub.BizServiceInterface() {
            @Override
            public String provideExaminationName() {
                return "你最爱吃的水果是什么？";
            }

            @Override
            public String provideExaminationAnswerCount() {
                return "您已经作答32次";
            }
        };
    }

    @Override
    public BizProxyStub.BizDependence dependenceInterface() {
        return getDependence();
    }


}
